package cn.izeno.wx.models.web

import cn.izeno.wx.service.WebWxApp
import com.alibaba.fastjson.annotation.JSONField
import java.util.*

abstract class BaseMessage(
    @field:JSONField(name = "Type")
    val type: Int = 1,


    @field:JSONField(name = "ToUserName")
    var toUserName: String,

    @field:JSONField(name = "FromUserName")
    val fromUserName: String = WebWxApp.user.username,


    @field:JSONField(name = "LocalID")
    var localId: String = System.currentTimeMillis().toString() + Random().nextLong().toString().substring(1, 5),
    @field:JSONField(name = "ClientMsgId")
    var clientMsgId: String = localId
)